﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    culture="auto" meta:resourcekey="PageResource1" uiculture="auto"
    CodeFile="AlertList.aspx.cs" Inherits="TrackingManage_AlertList" Title="车辆动态提示" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="title"><asp:Label ID="lblPageType" runat="server" Text="车辆动态提示" meta:resourcekey="lblPageTypeResource1"></asp:Label></div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table class="add_table" cellspacing="1" cellpadding="3" style="width: 100%" align="center">
                <tr>
                    <td align="right" width="15%"><asp:Label ID="lblSShipper" runat="server" Text="托运人：" meta:resourcekey="lblSShipperResource1"></asp:Label></td>
                    <td>
                        <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstShipperResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtender2" runat="server" TargetControlID="lstShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelShipperResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtender4" runat="server" TargetControlID="lstSelShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnAddSShipper" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnAddSShipper_Click" meta:resourcekey="btnAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnDeleteSShipper" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnDeleteSShipper_Click" meta:resourcekey="btnDeleteResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td align="right" width="15%"><asp:Label ID="lblSWhouse" runat="server" Text="仓库/码头：" meta:resourcekey="lblSWhouseResource1"></asp:Label></td>
                    <td>
                        <asp:DropDownList ID="ddlWhouse" runat="server" 
                            meta:resourcekey="ddlWhouseResource1"></asp:DropDownList>
                    </td>
                    <td align="right" width="15%"><asp:Label ID="lblSVendor" runat="server" Text="工厂：" meta:resourcekey="lblSVendorResource1"></asp:Label></td>
                    <td>
                        <asp:DropDownList ID="ddlVendor" runat="server" 
                            meta:resourcekey="ddlVendorResource1"></asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="right"><asp:Label ID="lblSJobDate" runat="server" Text="收货日：" meta:resourcekey="lblSJobDateResource1"></asp:Label></td>
                    <td>
                        <asp:TextBox ID="txtJobDate" runat="server" onkeydown="return pdDate(this,event);"
                            meta:resourcekey="txtJobDateResource1"></asp:TextBox>
                    </td>
                    <td align="center" colspan="4">
                        <asp:Button ID="btnSearch" runat="server" Text="搜索" class="btn" 
                            OnClick="btnSearch_Click" meta:resourcekey="btnSearchResource1"/>
                    </td>
                </tr>
            </table>
            <div class="list_title">
             <div class="autoleft">
                &nbsp;<asp:Label ID="lblTotal" runat="server" 
                     meta:resourcekey="lblTotalResource1"></asp:Label><asp:Label ID="lblRecordFound" runat="server" Text="条记录" meta:resourcekey="lblRecordFoundResource1"></asp:Label></div>                   
                    <div class="autoright">                       
                        <asp:Label ID="lblPerPageDisplay" runat="server" Text="每页显示：" meta:resourcekey="lblPerPageDisplayResource1"></asp:Label>
                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="True" 
                            OnSelectedIndexChanged="ddlPages_SelectedIndexChanged" 
                            meta:resourcekey="ddlPagesResource1">
                            <asp:ListItem Text="10" Value="10" meta:resourcekey="ListItemResource1"></asp:ListItem>
                            <asp:ListItem Text="15" Value="15" meta:resourcekey="ListItemResource2"></asp:ListItem>
                            <asp:ListItem Selected="True" Text="20" Value="20" 
                                meta:resourcekey="ListItemResource3"></asp:ListItem>
                            <asp:ListItem Text="50" Value="50" meta:resourcekey="ListItemResource4"></asp:ListItem>
                            <asp:ListItem Text="100" Value="100" meta:resourcekey="ListItemResource5"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                     </div>
            <div style="overflow:auto; width:100%; height:400px; padding:1px;">
            <asp:GridView ID="gvAlertList" runat="server" AllowPaging="True" PageSize="20" AutoGenerateColumns="False"
                Width="100%" OnPageIndexChanging="gvAlertList_PageIndexChanging" OnRowCommand="gvAlertList_RowCommand"
                OnSorting="gvAlertList_Sorting" AllowSorting="True" 
                onrowdatabound="gvAlertList_RowDataBound" CssClass="tblGridView" 
                    meta:resourcekey="gvAlertListResource1">
                <PagerTemplate>
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <asp:Label ID="lblCurrentPage" runat="server" Text="页次:" meta:resourcekey="lblCurrentPageResource1"></asp:Label>&nbsp;<asp:Label 
                                    ID="Label1" runat="server" 
                                    Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1 %>' 
                                    meta:resourcekey="Label1Resource1"></asp:Label>/<asp:Label
                                    ID="Label2" runat="server" 
                                    Text='<%# ((GridView)Container.Parent.Parent).PageCount %>' 
                                    meta:resourcekey="Label2Resource1"></asp:Label>&nbsp;
                                <asp:Label ID="lblTotalPage" runat="server" Text="总计:" meta:resourcekey="lblTotalPageResource1"></asp:Label>&nbsp;<asp:Label 
                                    ID="Label3" runat="server" 
                                    Text="<%# ((System.Data.DataView)gvAlertList.DataSource).Count %>" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                            </td>
                            <td align="right">
                                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                    meta:resourcekey="LinkButton1Resource1" Text="首页"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                    meta:resourcekey="LinkButton2Resource1" Text="前页"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                    
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>" 
                                    meta:resourcekey="LinkButton3Resource1" Text="后页"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                    
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>" 
                                    meta:resourcekey="LinkButton4Resource1" Text="尾页"></asp:LinkButton>&nbsp;
                                <asp:Label ID="lblTurnOn" runat="server" Text="转第" meta:resourcekey="lblTurnToResource1"></asp:Label>
                                <asp:TextBox ID="txtPages" runat="server" Width="35px" 
                                    meta:resourcekey="txtPagesResource1"></asp:TextBox>
                                    <asp:Label ID="lblPages2" runat="server" Text="页" meta:resourcekey="lblPages2Resource1"></asp:Label>
                                    <asp:LinkButton ID="lbtnGo" runat="server" Text="提交" onclick="lbtnGo_Click" 
                                    meta:resourcekey="lbtnGoResource1"></asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                    
                </PagerTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="最后动态" meta:resourcekey="TemplateFieldResource1">
                        <ItemTemplate>
                            <asp:Label ID="lblLastTracking" runat="server" 
                                Text='<%# Eval("LastTracking") %>' meta:resourcekey="lblLastTrackingResource1"></asp:Label>
                            <asp:Label ID="lblHKLastTracking" runat="server" 
                                Text='<%# Eval("HKLastTracking") %>' meta:resourcekey="lblLastTrackingResource1"></asp:Label>
                            <asp:Label ID="lblENGLastTracking" runat="server" 
                                Text='<%# Eval("ENGLastTracking") %>' meta:resourcekey="lblLastTrackingResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="动态结束日期" 
                        meta:resourcekey="TemplateFieldResource2">
                        <ItemTemplate>
                            <asp:Label ID="lblLastTrackingEndDate" runat="server" 
                                Text='<%# Eval("LastTrackingEndDate") %>' 
                                meta:resourcekey="lblLastTrackingEndDateResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收货日期" SortExpression="JobDate" 
                        meta:resourcekey="TemplateFieldResource3">
                        <ItemTemplate>
                            <asp:Label ID="lblJobDate" runat="server" Text='<%# Eval("JobDate") %>' 
                                meta:resourcekey="lblJobDateResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="托运人" SortExpression="Shipper" 
                        meta:resourcekey="TemplateFieldResource4">
                        <ItemTemplate>
                            <asp:Label ID="lblShipper" runat="server" Text='<%# Eval("Shipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                            <asp:Label ID="lblHKShipper" runat="server" Text='<%# Eval("HKShipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                            <asp:Label ID="lblENGShipper" runat="server" Text='<%# Eval("ENGShipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="工厂" SortExpression="VendorID" 
                        meta:resourcekey="TemplateFieldResource5">
                        <ItemTemplate>
                            <asp:Label ID="lblVendor" runat="server" Text='<%# Eval("Vendor") %>' 
                                meta:resourcekey="lblVendorResource1"></asp:Label>
                            <asp:Label ID="lblHKVendor" runat="server" Text='<%# Eval("HKVendor") %>' 
                                meta:resourcekey="lblVendorResource1"></asp:Label>
                            <asp:Label ID="lblENGVendor" runat="server" Text='<%# Eval("ENGVendor") %>' 
                                meta:resourcekey="lblVendorResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="收货点" SortExpression="Place" 
                        meta:resourcekey="TemplateFieldResource6">
                        <ItemTemplate>
                            <asp:Label ID="lblPlace" runat="server" Text='<%# Eval("Place") %>' 
                                meta:resourcekey="lblPlaceResource1"></asp:Label>
                            <asp:Label ID="lblHKPlace" runat="server" Text='<%# Eval("HKPlace") %>' 
                                meta:resourcekey="lblPlaceResource1"></asp:Label>
                            <asp:Label ID="lblENGPlace" runat="server" Text='<%# Eval("ENGPlace") %>' 
                                meta:resourcekey="lblPlaceResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="仓库" SortExpression="Whouse" 
                        meta:resourcekey="TemplateFieldResource7">
                        <ItemTemplate>
                            <asp:Label ID="lblWhouse" runat="server" Text='<%# Eval("Whouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                            <asp:Label ID="lblHKWhouse" runat="server" Text='<%# Eval("HKWhouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                            <asp:Label ID="lblENGWhouse" runat="server" Text='<%# Eval("ENGWhouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="落货纸号" SortExpression="SONO" 
                        meta:resourcekey="TemplateFieldResource8">
                        <ItemTemplate>
                            <asp:Label ID="lblSONO" runat="server" Text='<%# Eval("SONO") %>' 
                                meta:resourcekey="lblSONOResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="体积" SortExpression="VOL" 
                        meta:resourcekey="TemplateFieldResource9">
                        <ItemTemplate>
                            <asp:Label ID="lblVOL" runat="server" Text='<%# Eval("VOL") %>' 
                                meta:resourcekey="lblVOLResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="派车类型" SortExpression="Type" 
                        meta:resourcekey="TemplateFieldResource10">
                        <ItemTemplate>
                            <asp:Label ID="lblType" runat="server" Text='<%# Eval("Type") %>' 
                                meta:resourcekey="lblTypeResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="车牌号" SortExpression="LicenseNO" 
                        meta:resourcekey="TemplateFieldResource11">
                        <ItemTemplate>
                            <asp:Label ID="lblLicenseNO" runat="server" Text='<%# Eval("LicenseNO") %>' 
                                meta:resourcekey="lblLicenseNOResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="司机" SortExpression="Driver" 
                        meta:resourcekey="TemplateFieldResource12">
                        <ItemTemplate>
                            <asp:Label ID="lblDriver" runat="server" Text='<%# Eval("Driver") %>' 
                                meta:resourcekey="lblDriverResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="拖车公司" SortExpression="ContractorID" 
                        meta:resourcekey="TemplateFieldResource13">
                        <ItemTemplate>
                            <asp:Label ID="lblContractor" runat="server" Text='<%# Eval("Contractor") %>' 
                                meta:resourcekey="lblContractorResource1"></asp:Label>
                            <asp:Label ID="lblHKContractor" runat="server" Text='<%# Eval("HKContractor") %>' 
                                meta:resourcekey="lblContractorResource1"></asp:Label>
                            <asp:Label ID="lblENGContractor" runat="server" Text='<%# Eval("ENGContractor") %>' 
                                meta:resourcekey="lblContractorResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="动态" meta:resourcekey="TemplateFieldResource14">
                        <ItemTemplate>
                            <a href='TrackingDtl.aspx?STID=<%# Eval("STID") %>&amp;TID=<%# Eval("TruckID") %>&amp;rtn=AlertList.aspx'>
                                <asp:Label ID="lblView" runat="server" Text="详细" meta:resourcekey="lblViewResource1"></asp:Label></a>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle HorizontalAlign="Center"/>
                <RowStyle HorizontalAlign="Center" />
            </asp:GridView>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    
</asp:Content>
